
With inheritance items (methods, attributes) can be redefined. The
old item is hidden by the new one. But redefined items can
be accessed by a qualified notation:
xx.yy
here xx denotes the name of the parent class which
previously defines the item and yy denotes the item.
Example
|  |

Now we would like to consider the following scenario:
Assume, class A contains a method B. The implementation of method
B contains a method call to method C. Now class A_derived is derived
from A. A_derived inherits the methods B and C from A, but it
redefines method C. If method B is invoked for an object of class
A_derived, the question is which version of method C is invoked
by B. The inherited but hidden version or the redefined version?
To ensure proper functionality of inherited method B Objective
VHDL will automatically call the inherited version of C!
To allow method B to invoke the redefined version of method B,
method B must be called with the prefix this.
The following example illustrates the application of
this.
Example
|